import Vue from 'vue'
import App from './App.vue'
import Router from "vue-router"
import main from "./main.js"
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(MintUI);
Vue.use(ElementUI);

//开启debug模式
Vue.config.debug = true;
Vue.use(Router);

Router.prototype.goBack = function () { 
  　　this.isBack = true
  　　window.history.go(-1)
  }

// 配置路由
export default new Router({
  routes: [
     {
        path: '/',
        component:home,
        component:resolve => require (['@/components/home'],resolve)
      },
      {
        path:"/search",
        component:search,
        component:resolve => require (['@/components/search'],resolve)
      },
      {
        path:"/my",
        component:my,
        component:resolve => require (['@/components/my'],resolve)
      },
      {
        path:"/faxian",
        component:faxian,
        component:resolve => require (['@/components/faxian'],resolve)
      },
      {
        path:"/shouye",
        component:shouye,
        component:resolve => require (['@/components/shouye'],resolve)
      },
      {
        path:"/register",
        component:register,
        component:resolve => require (['@/components/register'],resolve)
      },
      { path:"/login",
      component:login,
      component:resolve => require (['@/components/login'],resolve)
      },
  ]
})

new Vue({
  el: '#app',
  router,
  main,
  render: h => h(App)
})
